home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / MBLIB10.ZIP;1 / CPPEXAMP.ZIP / NETHDR.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-02  |  1.0 KB  |  60 lines

  1. #include <string.h>
  2.  
  3. #include "nethdr.hpp"
  4.  
  5. /*=========================================================================*/
  6.  
  7. void NetHdr::From (char *name, int net, int node)
  8.  
  9. {
  10.     strcpy (hdr.who_from, name);
  11.     hdr.orig_net = net;
  12.     hdr.orig_node = node;
  13. };
  14.  
  15. void NetHdr::From (char *name, int zone, int net, int node, int point)
  16.  
  17. {
  18.     strcpy (hdr.who_from, name);
  19.     hdr.orig_zone = zone;
  20.     hdr.orig_net = net;
  21.     hdr.orig_node = node;
  22.     hdr.orig_point = point;
  23. }
  24.  
  25. void NetHdr::To (char *name, int net, int node)
  26.  
  27. {
  28.     strcpy (hdr.who_to, name);
  29.     hdr.dest_net = net;
  30.     hdr.dest_node = node;
  31. }
  32.  
  33. void NetHdr::To (char *name, int zone, int net, int node, int point)
  34.  
  35. {
  36.     strcpy (hdr.who_to, name);
  37.     hdr.dest_zone = zone;
  38.     hdr.dest_net = net;
  39.     hdr.dest_node = node;
  40.     hdr.dest_point = point;
  41. }
  42.  
  43. void NetHdr::Subject (char *subject)
  44.  
  45. {
  46.     strcpy (hdr.subject, subject);
  47. }
  48.  
  49. void NetHdr::SetAttribute (unsigned int attr)
  50.  
  51. {
  52.     hdr.attribute |= attr;
  53. }
  54.  
  55. void NetHdr::UnsetAttribute (unsigned int attr)
  56.  
  57. {
  58.     hdr.attribute &= ~attr;
  59. }
  60.